package com.library.forms;/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.util.ArrayList;
import java.util.Iterator;

public class Copy {
    private Publication myPub;
    private int copyId;
    private boolean isAvailable=true;

    public boolean isIsAvailable() {
        return isAvailable;
    }

    public void setIsAvailable(boolean isAvailable) {
        this.isAvailable = isAvailable;
    }

    public Copy(Publication pub, int copyId) {
       
        this.copyId =copyId;
        this.myPub=pub;
       // myPub=new ArrayList<Publication>();
    }

    public Publication getMyPub() {
        return myPub;
    }

    public void setMyPub(Publication myPub) {
        this.myPub=myPub;
    }

    public int getCopyId() {
        return copyId;
    }

    public void setCopyId(int copyId) {
        this.copyId = copyId;
    }
    
    
    public void print()
    {
    System.out.println("   copy Id"+this.copyId);
    System.out.println("Publication"+this.myPub.getTitle());
//    Publication myPublication;
//    //Iterator it=myPub.iterator();
//    while(it.hasNext())
//    {
//    myPublication=(Publication)it.next();
//   myPublication.print();
//    
//    }
    
    }
    
    
}
